package com.mycontact.client.activity;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.mycontact.client.ClientFactory;
import com.mycontact.client.ui.ViewContactMainPanel;

public class MainPanelViewContactActivity extends AbstractActivity {
	private ClientFactory clientFactory;

	public MainPanelViewContactActivity(ClientFactory cf) {
		clientFactory = cf;
	}
	
	@Override
	public void start(AcceptsOneWidget panel, EventBus eventBus) {
		ViewContactMainPanel viewContactMainPanel = clientFactory.getViewContactMainPanel();
		viewContactMainPanel.setClientFactory(clientFactory);
		viewContactMainPanel.fillTable();
		panel.setWidget(viewContactMainPanel.asWidget());
	}

}
